package main.Q1401_1500;

import java.util.ArrayList;
import java.util.List;

public class Q1431_1440 {
    public static void main(String[] args) {
        System.out.println("Question1431：拥有最多糖果的孩子");
        System.out.println("Question1432：");
        System.out.println("Question1433：");
        System.out.println("Question1434：");
        System.out.println("Question1435：");
        System.out.println("Question1436：");
        System.out.println("Question1437：");
        System.out.println("Question1438：");
        System.out.println("Question1439：");
        System.out.println("Question1440：");
    }
}

class Question1431 {
    public List<Boolean> kidsWithCandies(int[] candies, int extraCandies) {
        int max = candies[0];
        for (int num : candies) {
            max = Math.max(max, num);
        }
        List<Boolean> result = new ArrayList<>();
        for (int num : candies) {
            if (num + extraCandies >= max) result.add(true);
            else result.add(false);
        }
        return result;
    }
}